package it.univaq.mwt.common.business;

import it.univaq.mwt.business.GroupsService;

public abstract class GroupsServiceFactory {


	private static GroupsServiceFactory instance;
	
	public abstract GroupsService getGroupsService();
	

	protected GroupsServiceFactory() {
	}
	
	public synchronized static GroupsServiceFactory getInstance() {
		if (instance==null) {
			throw new RuntimeException();
		}
		return instance;
	}
	

	public synchronized static void setInstance(GroupsServiceFactory factory) {
		if (instance!=null) {
			throw new RuntimeException();
		}
		instance = factory;
		
	}

}
